@extends('layouts.app')
@section('content')
    <div class="container">
        <div class="row">
            <div class="col-md-12 col-lg-12">
                <div class="panel panel-default">
                    <div class="panel-heading">订单详情</div>
                    <div class="panel-body ">
                        <form action="{{route('admin.order.fail_checkout')}}" method="post" class="form-horizontal">
                            <input type="hidden" name="order_id" value="{{$order->id}}">
                            {{csrf_field()}}
                            <div class="form-group">
                                <label for="email" class="col-md-4 control-label">订单编号</label>
                                <div class="col-md-6">
                                    {{$order->code}} <span class="label label-info">{{$order->status_text}}</span>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="email" class="col-md-4 control-label">日期</label>
                                <div class="col-md-6">
                                    {{$order->created_at}}
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-md-4 control-label">姓名</label>
                                <div class="col-md-6">
                                    {{$order->name}}
                                </div>
                            </div>
                            <div class="form-group">
                                <label for="email" class="col-md-4 control-label">联系电话</label>
                                <div class="col-md-6">
                                    {{$order->phone}}
                                </div>
                            </div>

                            <div class="form-group ">
                                <label for="email" class="col-md-4 control-label">行程</label>
                                <div class="col-md-6">
                                    {{$order->start}}=>{{$order->end}}<br />
                                    出发地：{{$order->start_address}}<br />
                                    目的地：{{$order->end_address}}<br />
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="email" class="col-md-4 control-label">乘车时间</label>
                                <div class="col-md-6">
                                    {{$order->date}}
                                </div>
                            </div>
                            <div class="form-group ">
                                <label for="email" class="col-md-4 control-label">状态</label>
                                <div class="col-md-6">
                                    {{$order->status_text}}
                                </div>
                            </div>
                            @if($order->status==0)
                            <div class="form-group {{ $errors->has('fail_msg') ? ' has-error' : '' }}">
                                <label  class="col-md-4 control-label">无法出票原因</label>
                                <div class="col-md-6">
                                    <textarea name="fail_msg" class="form-control"  cols="30" rows="5"></textarea>
                                    @if ($errors->has('fail_msg'))
                                    <span class="help-block">
                                        <strong>{{ $errors->first('fail_msg') }}</strong>
                                    </span>
                                    @endif
                                </div>
                            </div>
                            
                            @endif
                            <div class="form-group">
                                <div class="col-md-8 col-md-offset-4">
                                    @if($order->status==0)
                                    <button type="submit" class="btn btn-primary">&nbsp;&nbsp;提交&nbsp;&nbsp;</button>
                        
                                    @endif
               
                                </div>
                            </div>
                            
                            
                            
                            
                        </form>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection
@section('js')
<script>

</script>
@endsection

